package com.zb.excel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.zb.excel.converter.UserExcelConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @Author WEN
 * @Date 2024/1/3 0003
 **/
@Data
@Accessors(chain = true)
@ApiModel("客户Excel对象")
@HeadRowHeight(30)  // 表头行高
@ContentRowHeight(15)  //内容行高
@ColumnWidth(20)  //列宽
public class UserExcelExport {
    @ExcelProperty(value = "客户编码")
    private String code;

    @ExcelProperty(value = "账号昵称")
    private String accountName;

    @ExcelProperty(value = "登录账号")
    private String account;

    @ApiModelProperty(value = "账号状态：0-正常，1-冻结，2-禁用")
    @ExcelProperty(value = "客户状态", converter = UserExcelConverter.class)
    private Integer status;

    @ExcelProperty(value = "客户主联系人姓名")
    private String username;

    @ExcelProperty(value = "客户主联系人机号")
    private String phone;

    @ExcelProperty(value = "客户等级")
    private String level;

    @ExcelProperty(value = "客户分类")
    private String userType;

    @ApiModelProperty(value = "是否根据权限查看知识库：false-查看所有，true-根据权限查看")
    @ExcelProperty(value = "知识库查看权限", converter = UserExcelConverter.class)
    private Boolean selectKnowledgeAuthor;

    @ExcelProperty(value = "客户邮箱")
    private String email;

    @ExcelProperty(value = "客户联系地址省")
    private String province;

    @ExcelProperty(value = "客户联系地址市")
    private String city;

    @ExcelProperty(value = "客户联系地址县/区")
    private String area;

    @ExcelProperty(value = "客户联系地址镇")
    private String town;

    @ExcelProperty(value = "客户联系详细地址")
    private String address;

    @ExcelProperty(value = "客户工单量")
    private int orderNo;

    @ExcelProperty(value = "客户商品数")
    private int productNo;

    @ApiModelProperty(value = "是否绑定微信：false-未绑定，true-已绑定")
    @ExcelProperty(value = "是否绑定微信", converter = UserExcelConverter.class)
    private Boolean bindingWechat = Boolean.FALSE;

    @ExcelProperty(value = "最后登录时间")
    private Date lastLoginTime;

    @ExcelProperty(value = "注册时间")
    private Date createTime;

    @ExcelProperty(value = "更新时间")
    private Date updateTime;
}
